/*
 * @Author: fah 1742484532@qq.com
 * @Date: 2024-09-13 16:44:07
 * @LastEditors: fah 1742484532@qq.com
 * @LastEditTime: 2024-09-13 17:11:22
 * @FilePath: \livetree-admin-server\src\auth\auth.controller.ts
 * @Description: 指飞部-企业数字化管理系统
 * @version: 1.0
 */
import { Body, Controller, HttpCode, Post } from '@nestjs/common';
import { AuthService } from './auth.service';

@Controller('auth')
export class AuthController {
  constructor(private readonly authService: AuthService) {}

  @HttpCode(200)
  @Post('login')
  signIn(@Body() signInDto) {
    return this.authService.signIn(signInDto.username, signInDto.pass);
  }
  
  @HttpCode(200)
  @Post('/loginByWechat')
  signInByWechat(@Body('code') code, @Body('user_info') user_info) {
    return this.authService.signInByWechat(code, user_info);
  }
}
